<?php
namespace app\index\controller;

use app\common\model\CoupleBack as CoupleBackModel;

/**
 * 反馈信息控制器
 * Class Index
 * @package app\index\controller
 */
class CoupleBack extends Base
{
    /**
     * [postAdd  添加反馈数据]
     * @return json
     * @author [C。]
     */
    public function postAdd()
    {
        $param = input('param.');
        $user = $this->user;
        $map = [];
        $model = new CoupleBackModel;
        try{
            $param['comid'] = $user['comid'];
            $param['mid'] = $user['mid'];
            $param['addtime'] = time();
            $id = $model->addData($param);
        }catch (\Exception $e) {
            systembug($e->getMessage(),3,$this->url);
            return admin_json(-1,$e->getMessage());
        }
        writelog($user['mid'],$user['comid'],'反馈信息成功id:'.$id);
        return admin_json(1,'反馈成功');
    }
}